package cn.class2.demo8.ysz

import java.io.File

/**
  * Created by lzd on 2018/11/28.
  */
object MyPreDef {
  //File -> RichFile的一个方法，用implicit关键字修饰

  implicit def file2RichFile(file: File): RichFile = new RichFile(file)

  implicit def IntAdd(int: Int): Demo = new Demo(int)

  implicit def helloworld(str: String): Demo2 = new Demo2(str)

  implicit def demo3Hello(demo: DemoEnd): Demo3 = new Demo3();
}
